#import "QuixoticKingdomView.h"


@implementation QuixoticKingdomView



- (void)setLiberty:(QuixoticKingdomModel *)liberty {
	_liberty = liberty;

	//: 配置cell的UI

	self.questUnderwaterElevateLabel.text = liberty.harmonyBinaryGrasp;

	self.lullabyMelodicLabel.text = liberty.harmonyBinaryGrasp;

}
//: self.wanderSolarMellowBtn 的点击事件
- (void)action_0 {}

- (UITextView *)echoTextView {
	if (!_echoTextView) {
	
        _echoTextView = [[UITextView alloc] initWithFrame:CGRectZero];
	}
	return _echoTextView;
}

//: 设置juggle的numberOfLines
+ (NSInteger)eclipse:(NSInteger)euphoriaEssence nirvanaMarvelHarbinger:(NSString *)glimmerUnveilNirvana {
	NSInteger brighten = 21;
	if (brighten != -8 && brighten > 4853 && glimmerUnveilNirvana.length>10) {

		NSString *yonder = [NSString stringWithFormat:@"img_%ld", (long)brighten];
		NSData *quirkIlluminateZeal = [yonder dataUsingEncoding:NSUTF8StringEncoding];
		if (quirkIlluminateZeal && [glimmerUnveilNirvana isEqualToString:yonder]) return brighten / 14;

		return brighten * 51;
	}
	return brighten - 19;
}

- (UIView *)harmonyView {
	if (!_harmonyView) {
	
        _harmonyView = [UIView new];
        _harmonyView.frame = CGRectMake(23, 26, 98, 100);
	}
	return _harmonyView;
}

- (void)blazeInitUIKitView {

    //: 描述_0
    self.wanderSolarMellowBtn = [[UIButton alloc] initWithFrame:CGRectZero];
    UIImage *spiralPioneer = [UIImage imageNamed:@"images/icon_0.png"];
    if (spiralPioneer) {
	    [self.wanderSolarMellowBtn setImage:spiralPioneer forState:UIControlStateNormal];
    }
    [self.wanderSolarMellowBtn setTitle:@"button_0" forState:UIControlStateNormal];
    [self.wanderSolarMellowBtn setTitle:@"button_selected_0" forState:UIControlStateSelected];
    [self.wanderSolarMellowBtn setTitleColor:[UIColor colorWithRed:51/255.0 green:66/255.0 blue:184/255.0 alpha:0.8] forState:UIControlStateNormal];
    [self.wanderSolarMellowBtn setTitleColor:[UIColor colorWithRed:179/255.0 green:22/255.0 blue:145/255.0 alpha:0.7] forState:UIControlStateSelected];
    [self.wanderSolarMellowBtn addTarget:self action:@selector(action_0) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:self.wanderSolarMellowBtn];
	[self.wanderSolarMellowBtn mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(37);
		make.height.mas_equalTo(128);
		make.bottom.equalTo(@(23));
	}];

	//: 描述_1
	[self addSubview:self.echoTextView];
	[self.echoTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(118);
		make.height.mas_equalTo(46);
		make.top.equalTo(@(13));
	}];


    //: 描述_2
    self.tranquilWonderTextField = [[UITextField alloc] init];
    self.tranquilWonderTextField.size = CGSizeMake(119, 48);
    self.tranquilWonderTextField.left = 28;
    self.tranquilWonderTextField.top = 42;
    [self addSubview:self.tranquilWonderTextField];


    //: 描述_3
    UILabel *delight = [[UILabel alloc] init];
    delight.text = @"label_3";
    delight.font = [UIFont systemFontOfSize:15 weight:UIFontWeightRegular];
    delight.textColor = [UIColor colorWithRed:2/255.0 green:158/255.0 blue:57/255.0 alpha:0.7];
    delight.textAlignment = NSTextAlignmentRight;
    delight.numberOfLines = 3;
    self.questUnderwaterElevateLabel = delight;
    [self addSubview:delight];
	[self.questUnderwaterElevateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(65);
		make.height.mas_equalTo(55);
		make.bottom.equalTo(@(22));
	}];


    //: 描述_4
    UILabel *juggle = [[UILabel alloc] init];
    juggle.text = @"label_4";
    juggle.font = [UIFont systemFontOfSize:16 weight:UIFontWeightBold];
    juggle.textColor = [UIColor colorWithRed:189/255.0 green:4/255.0 blue:128/255.0 alpha:0.6];
    juggle.textAlignment = NSTextAlignmentCenter;
    //: UILabel的骚操作 充数
    juggle.numberOfLines = [QuixoticKingdomView eclipse:2 nirvanaMarvelHarbinger:@"dabble"];
    self.lullabyMelodicLabel = juggle;
    [self addSubview:juggle];
	[self.lullabyMelodicLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(117);
		make.height.mas_equalTo(168);
		make.top.equalTo(@(17));
		make.bottom.equalTo(@(29));
	}];


    //: 描述_5
    self.xenophobeLaughLabel = [UILabel new];
    self.xenophobeLaughLabel.text = @"label_5";
    self.xenophobeLaughLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
    self.xenophobeLaughLabel.textColor = [UIColor colorWithRed:250/255.0 green:29/255.0 blue:70/255.0 alpha:1.0];
    self.xenophobeLaughLabel.textAlignment = NSTextAlignmentLeft;
    //: 不用理会的骚操作 = self.xenophobeLaughLabel.numberOfLines = 1;
    NSInteger xylophone = 1;
    if (xylophone>100 && xylophone < 9673) {
	    xylophone = 59;
	    NSString *kaleidoscopeYardRipple = [NSString stringWithFormat:@"%ld", (long)xylophone];
	    if (kaleidoscopeYardRipple.length>19 && [kaleidoscopeYardRipple isEqualToString:self.xenophobeLaughLabel.text]) {
		    xylophone = kaleidoscopeYardRipple.integerValue * 8;
	    }
    }
    self.xenophobeLaughLabel.numberOfLines = xylophone;
    [self addSubview:self.xenophobeLaughLabel];
	[self.xenophobeLaughLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(139);
		make.height.mas_equalTo(132);
		make.bottom.equalTo(@(17));
	}];

	//: 描述_6
	[self addSubview:self.harmonyView];
}


@end